package cn.com.blueInfo.bpm.template.enums;

import cn.com.blueInfo.bpm.common.enums.BaseEnum;
import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 网关类型
 * @author suxch
 * @since 2025/8/28 22:48
 */
@Getter
@AllArgsConstructor
public enum ParallelGatewayType implements BaseEnum<String> {

    /** 网关类型-并行开始，拆分多个分支 */
    PARALLEL_START("PARALLEL_START", "并行开始，拆分多个分支"),
    /** 网关类型-并行结束，合并多个分支 */
    PARALLEL_END("PARALLEL_END", "并行结束，合并多个分支");

    @EnumValue
    private final String code;

    @JsonValue
    private final String desc;

    public static ParallelGatewayType getByCode(String code) {
        return BaseEnum.getByCode(ParallelGatewayType.class, code);
    }

    @JsonCreator
    public static ParallelGatewayType getByName(String name) {
        return BaseEnum.getByName(name, ParallelGatewayType.class);
    }

}
